local WeRecAPI_IOS = class("WeRecAPI_IOS")

function WeRecAPI_IOS:ctor()
	self._toolbarVisible = false
end


function WeRecAPI_IOS:apiAvailable()
	local ok,ret = luaoc.callStaticMethod("RKScreenRecorder", "apiAvailable", nil)
	if not ok then
		print("Call RKScreenRecorder apiAvailable fail:",ret)
		return false
	end
	return ret
end

function WeRecAPI_IOS:showToolbar()
	local ok,ret = luaoc.callStaticMethod("RKScreenRecorder", "showRecorderBtn", nil)
	if not ok then
		print("Call WeRecManager showWeRecSdkMenu fail:",ret)
		return 
	end
	self._toolbarVisible = true
end


function WeRecAPI_IOS:hideToolbar()
	local ok,ret = luaoc.callStaticMethod("RKScreenRecorder", "hideRecorderBtn", nil)
	if not ok then
		print("Call WeRecManager hideWeRecSdkMenu fail:",ret)
		return 
	end
	self._toolbarVisible = false
end

function WeRecAPI_IOS:isToolbarVisible()
	return self._toolbarVisible
end

return WeRecAPI_IOS